package com.woniuxy.rabbitmq83.direct;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * description: DirectProductor <br>
 * date: 2022/1/12 5:09 下午 <br>
 * author: shesaifei <br>
 * version: 1.0 <br>
 */

@Component
public class DirectProductor {
    @Resource
    private AmqpTemplate amqpTemplate;

    public void send(String message) {
        amqpTemplate.convertAndSend("directExchange", "chongqing", message);
    }
}
